package com.biz.primus.management.commodity.feign;

import com.biz.primus.commodity.vo.SaleTagQueryVo;
import com.biz.primus.commodity.vo.backend.SaleTagListItemVo;
import com.biz.primus.commodity.vo.saleTag.SaleTagVo;
import com.biz.primus.common.vo.SpringPageVO;
import com.biz.primus.management.commodity.degraded.DegradedSaletagFeignClient;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 分类Feign Client
 *
 * @author david-liu
 */
@FeignClient(name = "service-commodity", fallback = DegradedSaletagFeignClient.class)
public interface SaletagFeignClient {

    @PostMapping("soa/saleTagService/findAll")
    SpringPageVO<SaleTagListItemVo> findAll(@RequestBody SaleTagQueryVo reqVo);

    @GetMapping("soa/saleTagService/getSaleTag")
    SaleTagVo getSaleTagById(@RequestParam("id") Long id);

    @PostMapping("soa/saleTagService/updateSaleTag")
    void update(@RequestBody SaleTagVo saleTagVo);

    @PostMapping("soa/saleTagService/deleteSaleTag")
    void deleteSaleTag(@RequestParam("id") Long id);
}
